package com.bfly.mall.order.enums;

/**
 * 退款类型
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/26 9:17
 */
public enum RefundTypeEnum {
    MONEY(1, "退款"),
    MONEY_PRODUCT(2, "退款退货");

    private int id;
    private String name;

    RefundTypeEnum(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static RefundTypeEnum getType(int id) {
        for (RefundTypeEnum status : RefundTypeEnum.values()) {
            if (id == status.getId()) {
                return status;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
